@import "../common-var";
.layout-module_RamblyJot {
  .rambly-module_editor {
    position: relative;
    height: calc(~"19vh");
    max-width: 100%;
    border-radius: 5px;
    display: flex;
    flex-direction: column;

    .scrollbar-visible {
      height: calc(~"100% - 42px");

      .layout-mode-fixed {
        height: 100%;
        position: relative;
      }

      // 编辑器内容区
      .editor-body {
        border: 1px solid var(--rj-editor-bg-color);
        height: calc(~"100%");
        position: relative;
        background: var(--rj-editor-bg-color);
        border-radius: 4px;
        padding: 20px 0 20px 30px;

        .editor-wrap {
          display: flex;
          height: 100%;
          overflow-y: auto;
          overflow-x: hidden;
          position: relative;
          overflow-anchor: none;

          .editor-wrap-content {
            flex: 1;
            height: 100%;
            min-width: 600px;

            .am-engine {
              height: 100%;
              color: var(--font-color);
            }
          }
        }

        &:hover {
          border-color: @primary-color;
        }
      }

      .editor-focus {
        border-color: @primary-color;
      }
    }

    .curtain-operation {
      .curtain-wrap {
        border: none;
        background: none;
        height: 30px;
        width: 30px;
        position: relative;
        float: right;
        bottom: 30px;
        right: -2px;
        .iconfont {
          font-weight: bold;
          font-size: 17px;
        }
      }
    }

    .rambly-module_action {
      margin-top: 10px;

      .toolbar-ui {
        width: 100%;
        display: flex;
        justify-content: space-between;

        .toolbar-wrap {
          display: flex;
          align-items: center;

          /deep/ .editor-toolbar {
            border: none;
            width: unset;

            .editor-toolbar-content {
              justify-content: left !important;
              width: unset;

              .editor-toolbar-group {
                padding: 0;
              }

              .toolbar-button:not(:last-child) {
                margin-right: 5px;

                .toolbar-title {
                  font-size: 14px;
                  margin-left: 5px;
                }
              }

              .toolbar-button {
                color: var(--title-color);

                .toolbar-title {
                  font-size: 14px;
                  margin-left: 5px;
                }
              }

              .toolbar-button:hover {
                background-color: unset;
                border: 1px solid unset;
                color: #00B96B;
              }

              .toolbar-dropdown-heading {
                margin-right: 10px;

                .toolbar-button {
                  margin-right: 5px;
                  padding-left: 0;

                  .toolbar-dropdown-button-text {
                    font-weight: normal;
                    font-size: 14px;
                  }

                  .data-icon-arrow {
                    right: 15px;
                  }
                }
              }
            }
          }

          .title-btn {
            display: flex;
            align-items: center;
            margin-left: 5px;

            .add-title {
              font-size: 17px;
              margin-right: 5px;
            }
          }

          .title-btn:hover {
            color: #00B96B;
            cursor: pointer;
          }
        }
      }

      .rambly-module_button {
        display: flex;
        align-items: center;

        .ivu-btn[disabled] {
          color: var(--title-color);
          background: var(--dropdown-bg-color);
        }
      }
    }

    .modal-lock {
      width: 100%;
      height: 100%;
      position: absolute;
      background-color: rgba(255,255,255, 0.4);
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: center;

      .lock-tip {
        margin-bottom: 5%;
        display: flex;
      }
    }
  }

  .extend-curtains {
    height: calc(~"75vh");
  }

  .rambly-module_list {

    .rambly-item {
      border-radius: 6px;
      padding: 25px 0 20px 0;
      display: flex;
      flex-direction: row;

      .item-right {
        margin-left: 20px;
        width: 100%;

        /deep/.username {
          font-size: 14px;
          font-weight: 600;
        }

        .post-content {
          p {
            color: var(--font-color);
            font-size: 15px;
            line-height: 22px;
            margin: 10px 0 0;
            -webkit-box-orient: vertical;
            display: -webkit-box;
            max-height: 68px;
            overflow: hidden;
            text-overflow: ellipsis;
            word-break: break-word;
            -webkit-line-clamp: 3;
          }
        }

        .post-image {
          .photo-content {
            margin: 20px 0 0;

            .cover-url {
              margin: 10px 0 0;

              .cover-url-item {
                max-height: 300px;
                max-width: 100%;
                overflow: hidden;
                position: relative;
                border-radius: 5px;
                cursor: zoom-in;

                .blur {
                  backdrop-filter: blur(25px);
                  -webkit-backdrop-filter: blur(25px);
                  -moz-backdrop-filter: blur(25px);
                  -ms-backdrop-filter: blur(25px);
                  background: #70707003;
                  bottom: 0;
                  height: 100vh;
                  left: 0;
                  max-height: 500px;
                  position: absolute;
                  right: 0;
                  top: 0;
                  width: 100%;
                  z-index: 1;
                }
              }
            }
          }

          .p1 {
            .bottom-mask {
              display: block;
              position: absolute;
              z-index: 0;
              height: 100%;
              width: 100%;

              .bottom-img {
                height: 100%;
                width: 100%;
              }
            }

            .cover-item {
              position: relative;
              z-index: 2;

              img {
                max-height: 240px !important;
                min-width: 20% !important;
                object-fit: cover;
                display: block;
                margin: 0 auto;
              }
            }
          }

          .p2 {
            .bottom-mask {
              display: flex;
              position: absolute;
              z-index: 0;
              height: 100%;
              width: 100%;

              .bottom-img {
                height: 100%;
                width: 50%;
              }
            }

            .cover-item {
              display: flex;
              position: relative;
              z-index: 2;
              justify-content: center;
              height: 100%;

              .cover-item-box {
                height: 100%;

                img {
                  max-width: 80% !important;
                  height: auto !important;
                  object-fit: cover;
                  display: block;
                  margin: 0 auto;
                }
              }

              .cover-item-box:first-child {
                img {
                  float: right;
                }
              }
              .cover-item-box:last-child {
                img {
                  float: left;
                }
              }
            }
          }

          .p3 {
            .more-images {
              display: flex;
              flex-wrap: wrap;
              justify-content: space-between;

              .cover-item-box {
                min-width: 32%;
                max-width: 32%;
                min-height: 100%;

                .cover-url-item {
                  width: 100%;
                  height: 100%;
                  //height: auto;
                  object-fit: cover;
                  cursor: zoom-in;
                  /*
                  object-fit 属性有以下几个值：
                    fill：图片会缩放以完全填充容器，可能会变形。
                    contain：图片会缩放以适应容器，保持宽高比，不留白。
                    cover：图片会缩放以覆盖容器，保持宽高比，可能会被裁剪。
                    none：图片不会缩放，保持原始尺寸。
                    scale-down：图片会缩放到其尺寸小于或等于容器尺寸的最大尺寸。
                  */
                }
              }
            }
          }
        }

        .action-box {
          margin-top: 5px;
          display: flex;
          align-items: center;
          flex-direction: row;
          justify-content: space-between;
          color: var(--title-color);

          .post-time {
            margin-right: 10px;
            margin-left: 3px;
            font-size: 13px;
          }

          .action {
            margin-right: 3px;
            .like-btn {
              margin-left: 8px;
            }
          }
        }
      }
    }
  }
}

// 第三方插件样式覆盖
/deep/.am-engine {
  background-color: unset;
  letter-spacing: .06em;
  padding-right: 12px;

  &>p {
    line-height: 1.5;
    margin: 4px 0;
  }

  &>:not(p) {
    margin: 12px 0;
  }
}

/deep/.am-engine>ul {
  margin: 4px 0;
  li {
    margin-top: 4px;
    margin-bottom: 4px;
  }
  li:not(.data-list-item) {
    margin: 4px 0  4px 15px;
  }
}
